package reno.activity.mo;

import reno.activity.eo.ActivityEntity;

import java.util.HashMap;
import java.util.Map;

public class ActivityPool {

    private static volatile ActivityPool activityPool;

    private ActivityPool() {}

    public static ActivityPool getInstance() {
        if (activityPool == null) {
            synchronized (ActivityPool.class) {
                if (activityPool == null) {
                    activityPool = new ActivityPool();
                }
            }
        }
        return activityPool;
    }

    private Map<Long, ActivityEntity> activityPoolMap = new HashMap<>();

    public Map<Long, ActivityEntity> getActivityPoolMap() {
        return activityPoolMap;
    }

    public void setActivityPoolMap(Map<Long, ActivityEntity> activityPoolMap) {
        this.activityPoolMap = activityPoolMap;
    }
}
